#!/usr/bin/env python

import re
import subprocess
import sys

deps = subprocess.check_output(["@CC@", "-x", "c", "-MM", sys.argv[1]])
deps = re.sub(r'\w+\.o: ', '', deps)
deps = deps.replace('\\', '')
print deps,
